@model OurWedding1.Models.Place

@* This partial view defines form fields that will appear when creating and editing entities *@

<div class="editor-label">
    @Html.LabelFor(model => model.Name)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Name)
    @Html.ValidationMessageFor(model => model.Name)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Adress)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Adress)
    @Html.ValidationMessageFor(model => model.Adress)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.City)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.City)
    @Html.ValidationMessageFor(model => model.City)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.PostCode)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.PostCode)
    @Html.ValidationMessageFor(model => model.PostCode)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Latitude)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Latitude)
    @Html.ValidationMessageFor(model => model.Latitude)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Longitude)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Longitude)
    @Html.ValidationMessageFor(model => model.Longitude)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Website)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Website)
    @Html.ValidationMessageFor(model => model.Website)
</div>

<div class="editor-label">
    Wedding
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.WeddingId, ((IEnumerable<OurWedding1.Models.Wedding>)ViewBag.PossibleWeddings).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Name), 
        Value = option.WeddingId.ToString(),
        Selected = (Model != null) && (option.WeddingId == Model.WeddingId)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.WeddingId)
</div>
<div class="editor-label">
    PlaceType
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.PlaceTypeId, ((IEnumerable<OurWedding1.Models.PlaceType>)ViewBag.PossiblePlaceTypes).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Name), 
        Value = option.PlaceTypeId.ToString(),
        Selected = (Model != null) && (option.PlaceTypeId == Model.PlaceTypeId)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.PlaceTypeId)
</div>
